<?php
//截取标题长度
function truncate($title,$len){
    $length=mb_strlen($title,'utf-8');
    if($length>$len){
        $title=mb_substr($title, 0,$len,'utf-8')."...";
    }
    return $title;
}
//获得某一属组中的个数
function tota($a){
    $total=count($a);
    return $total;
}